package com.neolix.watch;


import android.os.Bundle;

import com.neolix.watch.util.Constant;

import static com.neolix.watch.util.SharedPreferencesUtil.firstStartApp;
import static com.neolix.watch.util.SharedPreferencesUtil.isFirstStartApp;


public class WelcomeActivity extends NeolixBaseActivity {

    public WelcomeActivity() {
        super(R.layout.activity_welcome);
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        myThread.start();
    }

    private Thread myThread = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                Thread.sleep(Constant.ONE_SECOND * 2);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            if (isFirstStartApp()) {
                firstStartApp(false);
                goTo(GuideActivity.class);
            } else
                goTo(MainActivity.class);

            finish();
        }
    });
}
